package org.lifei.exception;


/**
 * 自定义业务异常
 *
 */
public class BusinessException extends RuntimeException{
    private Integer code;

    //根据自己的需求提供一些构造方法
    public BusinessException(String message){
        super(message);
    }

    public BusinessException(ResponseCode responseCode){

        super(responseCode.getMsg());
        this.code=responseCode.getCode();
    }
    public Integer getCode(){
        return code;
    }

}